package com.caregiver.watch.business.care.model.vo;

import com.caregiver.watch.business.user.enums.BloodPressureStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @Description: 血压详情数据
 * @program: caregiver-watch
 * @author: 疆戟
 * @create: 2025-10-02 16:54
 */
@Data
@Schema(description = "血压详情数据")
public class BloodPressureDetailDataVo {


    @Schema(description = "血压数据列表")
    private List<BloodPressureData> bloodPressureDataList;

    public static BloodPressureDetailDataVo build(List<BloodPressureData> bloodPressureDataList) {
        BloodPressureDetailDataVo bloodPressureDetailDataVo = new BloodPressureDetailDataVo();
        bloodPressureDetailDataVo.bloodPressureDataList = bloodPressureDataList;
        return bloodPressureDetailDataVo;
    }


    @Data
    @Schema(description = "血压数据")
    public static class BloodPressureData {

        @Schema(description = "血压状态 NORMAL：正常 HIGH：高压  LOW:低压")
        private BloodPressureStatusEnum status;

        @Schema(description = "时间（单位分钟）")
        private Integer time;

        @Schema(description = "收缩压")
        private Integer systolic;

        @Schema(description = "舒张压")
        private Integer diastolic;

        public static BloodPressureData build(BloodPressureStatusEnum status, Integer time, Integer systolic, Integer diastolic) {
            BloodPressureData bloodPressureData = new BloodPressureData();
            bloodPressureData.status = status;
            bloodPressureData.time = time;
            bloodPressureData.systolic = systolic;
            bloodPressureData.diastolic = diastolic;
            return bloodPressureData;
        }
    }

}
